#ifndef TIMEDTASK_H_
#define TIMEDTASK_H_

#include "FloatingTask.h"
#include "DeadlineTask.h"
// @author A0096955J

/* Class Name: TimedTask
 *
 * This class models a deadline task in Taskline. It is a subclass of the super class
 * FloatingTask and inherits all properities from its super class. The unique attributes
 * of TimedTask will be that it contains start time and start date and end time and end date
 * 
 * Sample usage: 
 * TimedTask task,time_t currentTime;
 * task.setTimeAndDate(time(currentTime));
 * cout << task2.getStartTime();
 * cout << task2.getEndDate();
 * cout << task1.taskinfomation() << endl;
 */
class TimedTask: public FloatingTask {
	public:
	// constructors
	TimedTask(void);
	TimedTask(DeadlineTask*);
	TimedTask(string,string,string,string,int,int,int,time_t,time_t);

	// get attributes methods
	string getStartTime(); // HHMM format
	string getStartDate(); // DD/MM/YYYY format
	string getEndTime(); // HHMM format
	string getEndDate(); // DD/MM/YYYY format
	string getFullStartDateInfo(); // day, DD month YYYY
	string getFullEndDateInfo(); // day, DD month YYYY
	time_t getStartTimeAndDate(); 
	time_t getEndTimeAndDate();
	struct tm getStartTimeAndDateTmFormat();
	struct tm getEndTimeAndDateTmFormat();

	virtual TimedTask* clone() const;

	// set attributes methods
	void setStartTimeAndDate(time_t);
	void setStartTimeAndDate(struct tm);
	void setEndTimeAndDate(time_t);
	void setEndTimeAndDate(struct tm);

	string taskInfomation();
	string basicTaskInfomation();
	// deconstructor
	~TimedTask(void);
private:
	time_t startTimeAndDateTime_t;
	struct tm startTimeAndDateTmFormat;
	time_t endTimeAndDateTime_t;
	struct tm endTimeAndDateTmFormat;
};

#endif